**** PRINT OUT THIS PAGE ****

This is Webteacher's Webdata, version 2.27  Last modified on July 19, 1998.
 
Standard Disclaimer:
The authors, resellers, and distributers are not responsible for any loss of information, time, resources, business, hardware, software, or any damages resulting from the use of this program. As with any database, information should be backed up regularly, and the program should be tested thoroughly before using it for real world purposes. Use Webteacher's Webdata at your own risk.
   

New Modifications

Modifications in 2.27c
A Perl 5 function was removed to allow Webdata to run under Perl 4 again
A bug has been fixed which prevented the 'Return to Administration Page' link from working when no records were found.
Modifications in 2.27b
The cuseom search header was stripping any lines after a carraige return. This has been fixed.
Modifications in 2.27a
An upgrade program has been included with this version. It only works with version 2.26. To use, upload webdata.cgi and upgrade.pl to the server. Telnet in and type:
perl upgrade.pl webdata_[dbname].cgi
A bug has been fixed which sometimes caused problems when members logged in.
Users and administrators can go to any results page with numbered links at the bottom of large search results.
Custom search pages that use the "multiple selections" option on select lists will be received by the search engine as "first item or second item".
Searches that return no results now display "No records found" instead of a blank table.
Administrators can now add custom HTML to the default search form.
Administrators can now choose whether to display the search instructions on the default search form.
Modifications in 2.26
A bug has been fixed which caused the boolean searches to fail sometimes.
A different sorting algorythm has been implemented to speed up the sort process.
The Admin and Member search results now show only 20 results at a time.
Modifications in 2.25
A bug has been fixed which sometimes caused the member ID to be offset by one field.
Fields containing *.gif or *.jpg are automatically converted to <IMG SRC="*.gif"> in user search results
Checkboxes now store the word "yes" instead of the Netscape default of "on".
Redefine field button now retains old values in prompt boxes.
The installer now creates a unique ID for registration purposes.
Modifications in 2.24
A bug was fixed which caused links and URLs not to show on some servers.
A bug was fixed which caused images and other HTML with quotes not to work in the VIEW page.
Modifications in 2.23
A bug was fixed which caused add and search errors in fields who's name contained special characters.
Modifications in 2.22
A bug was fixed which caused some member entries to lose the last field.
Modifications in 2.21
A bug has been fixed which was causing errors in date searches.
The program now recognizes xx/xx/xx?? as a date, and automatically converts both field values and search criteria to 4 digit years (year 2k for years less than 20).
The "and" and "or" criteria now work in the admin searches.
A "view" button may now be displayed on each record to display the record in a columnar form page.
  Choose whether or not to use this feature on the "Customize Report" page.

Modifications in 2.2
Fields now can be defined as text, checkbox, or selection list.
JavaScript has beed added to the modify fields page to assist in creation of new fields.
e-mail (*@*.*) and URLs (http://*) are automatically converted to links.
 Modifications in 2.1
Administrators can now change the color, header text, field sequence, and sort order of user search results table.
A Customize Reports button has been added to the Administration page.
The reports page has a box for an HTML color or Hex Triplet (#RRGGBB)
The reports page has a large textarea for header code. This can contain HTML tags including links and images.
Admins can click the available fields to choose the sequence of columns in the report table. This also allows
users to omit fields which they would like to leave hidden.
Admins can select the field by which they would like to sort.
Customized User Search pages are no longer restricted by sequence, they are driven by fieldname.
Default input boxes have been expanded to 60 characters.
A 'Delete Found Set' button has beed added to the Administration Search Results, allowing the administrator to delete multiple records.
Modifications in 2.0
A bug has been fixed which prevented MSIE4 users from adding records.
The installer now asks whether visitors should be allowed to add records.
The installer now asks whether visitors should be allowed to search for records.
A bug has been fixed which caused user searches to sometimes be added.
The default line in the data file is now visible so that it can be deleted once data is added
The Admin can now create 'member' accounts in which members can enter a unique password and add, modify, or delete only their own records.
The readme now includes instructions for remote installation without telnet access.

Welcome

and thank you for purchasing WEBDATA, the first easy database CGI for the web.
Before you run the installer program, you will need to complete this worksheet.  It will be easiest
to write on a printout of this page before running the installer. There is an explanation of each question below the form.

The installer will prompt you for this information.  If you are unsure about any of this, you should contact your
system administrator.

Windows users, you only need to answer the questions marked with a [W].
Read the special Windows instructions in Italics below.
 
[W]1.  Choose a short name for this database.


2.  CGI scripts are stored:
                   ___ 1.  only in the cgi-bin directory
                   ___ 2.  in any directory, so long as the filename ends with .cgi

[W]3.  If you answered 1 above or you are running Windows NT, what is the path to the cgi-bin


4.  What is the path to Perl?


[W]5.  What URL would you like to link to at the bottom of each page when the user clicks on "Return to Homepage"



[W]6.  What would you like your password to be?



[W]7.  Would you like visitors to be able to ADD entries to the database (y/n)?



[W]8.  Would you like visitors to be able to SEARCH the database (y/n)?



[W]9.  How many search results would you like to display at one time?


[W]10.  What fields would you like in your database.  For example, FirstName, LastName, Address, City, State, Zip for a mailing list;
      or for a Car Lot, you may enter VIN, make, model, year, color, doors, condition, ammenities, price

    It will be quite a bit more difficult to add or remove field names after you have entered them in, so put some thought
    into this.  Be sure you include all the fields, and in the order in which you want them displayed.  Keep the names short and simple.
 
 
FIELDS ________________________
________________________
________________________
________________________
________________________
________________________
________________________
________________________
________________________
________________________
________________________
________________________ 


 

 
 
 

When you have completed this worksheet,

create a directory under your homepage directory
called webdata.  Move the 2 files,
    uinstall.pl
    webdata.cgi
into the webdata directory.
IMPORTANT: Be sure your FTP program is set to ASCII mode.

Use your telnet program to connect to your server, and go to the webdata directory. For a quick introduction to navigating Unix, see page 1 of webteacher.com's CGI tutorial at http://www.webteacher.com/perltour

[If you do not have telnet access, See the instructions for manual installation --GO THERE]

Type
    perl uinstall.pl
Answer the questions using this worksheet.  When you are done, you can point your browser
to webdata/[dbname]_admin.html  to begin adding records.  Where [dbname] is the name you chose in question #1.  You may wish to bookmark that page.
Create a link on your homepage to webdata/[dbname]_form.html
for your guests.  This page allows readers to search (and add to if you selected it) the database, but not modify it.
 
 Windows users:
Create a folder in your homepage folder called 'webdata'
Move thest two files into your webdata folder
    winstall.pl
    webdata.cgi

You must have Perl installed on your server to run Webdata or the installer.  You can
download Perl for free from this site.
http://www.ActiveState.com/software/Perl_for_Win32.htm
 

Double click on the winstall.pl icon.  A DOS window should appear with some text.  If
you have difficulty, be sure the ".pl" extension is associated with Perl.  You can also
launch the winstall.pl program by opening a DOS prompt, cd to the webdata directory,
and type 'perl winstall.pl'  .

Answer the questions using this worksheet.
 
*****************************************************************************************************

DETAILS ABOUT THE INSTALLATION QUESTIONS

1. Choose a short name for the database

The name you choose will be used in each of the files used by your database.  This will allow you to install more than 1 database on your website.  If you choose 'cars', for example, the user form will initially be named 'cars_form.htm'.  The administration page will be named 'cars_admin.htm'.  The data is stored in a hidden file called '.cars_data.log' and the fieldnames are kept in another hidden file called '.cars_fields.log'.  The program copied into the cgi-bin will be named 'webdata_cars.cgi'.

You may change the names of the 2 .htm pages if you wish, but not the log files or the cgi.

2. Do CGI scripts have to go in the cgi-bin directory?

If you have never installed a cgi script, I highly suggest e-mailing your system administrator with questions 2,3,&4.

In some cases, you will be required to use a special directory which is not named cgi-binIf you have been designated a special directory other than cgi-bin for your cgi scripts, here is what you should do.
 

 

The only way to answer this question without the help of your system adminsitrator is to try running a simple CGI, and see if it works. Follow these steps:

3. Locating the /cgi-bin/ directory

From a command prompt, type this command:
 find / -name cgi-bin -print |& grep -v denied

[W]Windows users - you know where your file search tools are.

This may take over 10 (or even 20) minutes to run, it is searching the entire server. The pipe character | is a vertical line, usually located on the right side of the keyboard above the [ENTER] key. It may appear as 2 lines above each other.  It is frequently  [SHIFT]+Backslash[\].

4. Locating the Perl program

The first line of every Perl program gives the location of Perl on the system.  This is so a command from an outside web page will instantly know what program to execute, and where to look for it.

From the command prompt, type  which perl and press [ENTER].

Hopefully, the system returned a line similar to this:

/usr/bin/perl
or
/usr/local/bin/perl

Write down the result.  This is the location of Perl on your system, and you will need it.

If the system did not return a result, try this:
 

If you still do not have the path to Perl, you will need to e-mail your system administrator.
 

5. What URL would you like to link to on "Return to Homepage?"

[W] read this...
The CGI will generate a link at the bottom of every window called 'Return to Homepage.'  This does not necessarally have to be your welcome page.  If you have an index or central page which is more useful you may wish to enter that address here.
Be sure to type the entire URL, for example, http://www.webteacher.com/javatour/framehol.htm
 

6. What would you like your password to be?

[W] read this...
I'm trying to think of anything to put here, really. The question is very straightforward.
 

7. Would you like visitors to be able to ADD entries to the database?

[W] read this...
If you are using Webdata for a guestbook, survey, or order form then you will need to give visitors the ability to add records to the database.  If you are displaying an on-line catalogue, on the other hand, you will want to restrict access to the database.

8. Would you like visitors to be able to SEARCH the database?

[W] read this...
In some cases, you may wish to allow visitors to add entries, but not to search the entire database.  Order forms and confidential surveys are not for public viewing, and you will choose NO to restrict access.

9. How many search results would you like to display at one time?

[W] read this...
If you accept the default of 15, and the user's search displays 43 results, then results 1-15 will appear on the first page with a button called "NEXT".
Clicking on "NEXT" will display results 16-30, etc.

15 is a good number for single line results, such as names and phone numbers.  If you plan to include comments, descriptions, biogrophies, resumes, pictures, or anything else that will make the result lines wider than 1 line, you may wish to choose a smaller number.  You can always change this later by changing the number on line 14 in the cgi script.

10. What field names would you like in your database?

[W] read this...
You will want to plan your field list carefully before installing.  Talk to as many people as you can.  Find out what kinds of things people will want from the database.  At the same time, remember that the display will be an HTML table.  If you try to cram 35 columns onto a line, you'll get a lot of tall skinny cells with one or two letters on each row.

You do not need to create a primary key.  The program secretly indexes each record with a unique number.
 
 


MANUAL INSTALLATION

If you do not have telnet access, you can still install webdata. You will need to run the installer on your PC, then change certain lines in the script and html pages. Finally, you will need to use your ftp program to chmod (change the access rights) after you upload the files.
  1. You will need to have Perl installed on your PC to run the installer. You can download Perl for free from http://www.perl.com
  2. Double click on the icon labeled "uinstall.pl". A DOS window should open with the installer running. Answer the questions as you would on your server. NOTE:For question 3, Where will the CGI scripts live on your server? Regardless of how your server is set up, answer with 2.
  3. If CGI scripts can live in any directory,
  4. If CGI scripts go in the cgi-bin directory, Make the following changes.
  5. Change the privilages as follows:
 
 

Customizing Webdata

There are 2 pages that the general public will see, the user search page, and the search results.

 To Customize the User Search page
The page you will link users to is called [database name]_form.html.  It will automatically query the Webdata CGI to read your list of fieldnames, and generate a search form "on-the-fly."  The advantage to this method is that if you should change your list of fields, the user search form will automatically reflect those changes.  The disadvantage is that it creates a rather plain beige screen, without your site's text and graphics.  You can save this page and modify it to match the look and feel of your site.

  1. Point your browser to [dbname]_form.html

  2. The program should create a user search form.
  3. Choose SAVE AS from the FILE menu, and choose a name and location for the custom form. For example, you may call it "search.html"
  4. Open the CGI script, and locate the definition of "$searchpage" at line 17.

  5.   $searchpage="$cgilocation?cgifunction=user";
    Replace the contents of the quotes with the URL of your custom search page, so if your URL is at www.mypage.com and the webdata folder is right under the homepage, then the line might look like this:
      $searchpage="http://www.mypage.com/webdata/search.html";
  6. Open the custom form you just saved in any text editor and make changes.  You may add titles, images, and text anywhere you wish.  There are just a few rules you need to keep in mind:
If you would like a more in-depth description with examples, check out the tutorial, later in this page.

To customize Search Results
Go to the [dbname]_admin.html page, enter your password. When the administration page loads, click on 'Customize Report'. Here you can change the color, add header HTML code, select which fields to display in what column sequence, choose a sort order, number of results per page, and whether to display the "view" button. When you have made your selection, click 'Modify Report' and wait for the page to reload. Then follow the link to the user's search page to see your modifications.

The "view" button is a good tool for databases that have a lot of fields.  If you cannot display all of the information in a single row of the results table, simply choose only the 3 or 4 most descriptive fields in the "column-sequence" box.  Then, check the "view button" checkbox.  When a user searches your database, he/she will see a concise list of search results, each with a "view" button.  Clicking on the "view" button will display all the information about that record.


Instructions for general use

Webdata has been designed to be extremely self-explanatory.  Most user instructions are included on the ADD and SEARCH web pages themselves.  You may wish to refer to the download page, which is loaded with screenshots and basic instructions for using Webdata.
 

Creating lists, comment boxes, checkboxes and resized text boxes

 Now in version 2.2 you can define your fields as lists, comment boxes or checkboxes, or define the size of text boxes.  Simply click on 'Modify Fields' on the Admin page.  Then, select the field you want to change, and click 'REDEFINE SELECTED FIELD'.  Enter the Name of the field (change it or keep it the same, it doesn't matter), and click OK.  Then enter the word list, comment, checkbox, or text, and click OK. Finally, for lists, you will be prompted to enter the list values in a comma seperated format.  For text boxes, you will be prompted to enter the size. For comment boxes, you will be prompted to enter how many rows you would like (column width is 60 characters).


Adding Members

You can create members of your database.  These people will each have their own password, and they will be able to add records, and to delete and modify only the records that they have added.
On the main administration page, accessed from [dbname]_admin.html, there is a button called "members."  Click this button to enter a screen with a list of existing members in the top half, and two boxes for creating a new member and password in the bottom half.  To remove a member, select the member in the top half and click the 'delete' button.  If a member forgets his/her password, delete the member, then create the account again, being careful to type the username exactly the same way.

Members can go to the [dbname]_members.html page to gain access to their records.

NOTE: Both the administration pages and the member pages use cookies to avoid prompting for a password more than once.  The cookies will expire each time you exit your browser.  If you are logged in as an administrator, and you wish to test the member pages, you will need to restart the browser to see the effects.  Members that share a terminal should be warned to exit the browser when they are finished.


Adding pictures and links

The search results are displayed inside an HTML table.  All HTML commands will work inside the table with the exception of SSI .  You can display a word in bold by simply typing <B>my text</B>.

Now in version 2.25, a field that contains only a URL will automatically be converted to an <A HREF> link when the user search is displayed.
A field that contains only an e-mail address will will be converted to a mailto: link.
A field that contains only a string of text ending with .gif or .jpg will automatically be converted to an <IMG> tag.

To add a picture, you may use either an absolute URL (begins with http://) or a filepath relative to the cgi script.  So, for example, if my website looked like this:

                   myaccount (at http://www.myaccount.com)
                  /         \
              htdocs         cgi-bin
             /   \                |
       images   webdata     webdata_[dbname].cgi
         |
      duck.gif
      swan.gif
      goose.gif

I could enter the image either of these 2 ways.
http://www.myaccount.com/images/duck.gif
or
../htdocs/images/duck.gif

NOTE: You may still enter an <IMG> tag manually if you would like to add special parameters such as "width=72" or "border=2".
 


Technical Notes

8 Files are created by the installer.